<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width:200px;
            height:200px;
            border:1px solid red;
        }
    </style>
</head>
<body>
    <div class="box">
        <button>按钮</button>
    </div>
    <div class="box">
        <button>按钮</button>
    </div>
    <div class="box">
        <button>按钮</button>
    </div>
    <script src="script/jquery.js"></script>
    <script>
        // $(".box").click(function(){
        //     $(this).find("button").css("background-color","red")
        // })
        $("button").click(function(){
            $(this).parent().css("background-color","red");
        })
    </script>
</body>
</html>